#include <gtest/gtest.h>

#include <vector>

#include "algorithm/common/include/decode.h"
using namespace std;
TEST(TestLeetcode, testDecode) {
  vector<int> encode1 = {6, 2, 7, 3};
  int first1 = 4;
  vector<int> res = decode(encode1, first1);
  vector<int> exp = vector<int>{4, 2, 0, 7, 4};
  EXPECT_EQ(res.size(), encode1.size() + 1);
  for (int i = 0; i < res.size(); i++) {
    EXPECT_EQ(res[i], exp[i]);
  }
}
